package com.itqian.system.service;

import com.itqian.system.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.itqian.system.form.AddUserForm;
import com.itqian.system.form.UserRegisterForm;
import com.itqian.system.vo.UserVO;

import java.util.Map;
import java.util.Set;

/**
 * <p>
 * 用户表 服务类
 * </p>
 *
 * @author shishuqian
 * @since 2022-03-21
 */
public interface UserService extends IService<User> {

    /**
     *
     * @author shishuqian
     * @desc   向用户的手机号发送短信
     */
    String sendSms(String phone,String akId,String akSecret) throws Exception;

    /**
     *
     * @author shishuqian
     * @desc   通过手机号查询用户
     */
    User getByPhone(String phone);


    /**
     *
     * @author shishuqian
     * @desc   添加用户
     */
    Integer addUser(AddUserForm form);

    /**
     *
     * @author shishuqian
     * @desc   分页查询用户数据
     */
    Map<String, Object> userList(Integer page,Integer size);

    /**
     *
     * @author shishuqian
     * @desc  修改用户身份权限
     */
    boolean editRole(Integer userId, Set<String> roles);

}
